#include "gtkpasswordentryprivate.h"
+#include "gtkaccessibleprivate.h"
#include "gtktextprivate.h"
#include "gtkeditable.h"
#include "gtkeventcontrollerkey.h"
static GParamSpec *props[NUM_PROPERTIES] = { NULL, };
static void gtk_password_entry_editable_init (GtkEditableInterface *iface);
+static void gtk_password_entry_accessible_init (GtkAccessibleInterface *iface);
G_DEFINE_TYPE_WITH_CODE (GtkPasswordEntry, gtk_password_entry, GTK_TYPE_WIDGET,
+ G_IMPLEMENT_INTERFACE (GTK_TYPE_ACCESSIBLE, gtk_password_entry_accessible_init)
G_IMPLEMENT_INTERFACE (GTK_TYPE_EDITABLE, gtk_password_entry_editable_init))
static void
iface->get_delegate = gtk_password_entry_get_delegate;
}
+static gboolean
+gtk_password_entry_accessible_get_platform_state (GtkAccessible *self,
+ GtkAccessiblePlatformState state)
+{
+ GtkPasswordEntry *entry = GTK_PASSWORD_ENTRY (self);
+
+ switch (state)
+ {
+ case GTK_ACCESSIBLE_PLATFORM_STATE_FOCUSABLE:
+ return gtk_widget_get_focusable (GTK_WIDGET (entry->entry));
+ case GTK_ACCESSIBLE_PLATFORM_STATE_FOCUSED:
+ return gtk_widget_has_focus (GTK_WIDGET (entry->entry));
+ default:
+ g_assert_not_reached ();
+ }
+}
+
+static void
+gtk_password_entry_accessible_init (GtkAccessibleInterface *iface)
+{
+ GtkAccessibleInterface *parent_iface = g_type_interface_peek_parent (iface);
+ iface->get_at_context = parent_iface->get_at_context;
+ iface->get_platform_state = gtk_password_entry_accessible_get_platform_state;
+}
+
GtkText *
gtk_password_entry_get_text_widget (GtkPasswordEntry *entry)
{